package com.itheima.day03;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;

public class Test5 {
    public static <T> void main(String[] args) {

        List<?> list=new ArrayList<>();
        ArrayList<T> al=new ArrayList<>();
    }

    public static void test(List<?> list) {

    }

    public static <T>void test1(List<T> list) {

    }
}

class Teacher<T> {

}
class User implements Cloneable {
    private int id;
    private String username;
    private double[] scores;

    @Override
   public User clone() throws CloneNotSupportedException {
        User clone = (User) super.clone();
        clone.scores=this.scores.clone();
        return clone;
    }

    public User() {
    }

    public User(int id, String username, double[] scores) {
        this.id = id;
        this.username = username;
        this.scores = scores;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return id == user.id && Objects.equals(username, user.username) && Arrays.equals(scores, user.scores);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(id, username);
        result = 31 * result + Arrays.hashCode(scores);
        return result;
    }
}